import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter)

import Home from '../components/Home.vue'
import Error from '../papes/Error.vue'
import Mine from '../papes/Mine.vue'
import Register from '../papes/Register.vue'
import Login from '../papes/Login.vue'
// import Theatre from '../pages/Theatre'
// import Hot from '../pages/movies/Hot.vue'
// import Coming from '../pages/movies/Coming.vue'
const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: Home
    },
    {
        path: '/mine',
        component: Mine,
        // redirect: '/movie/login',
        children:[
            {
            path:'register',
            component:Register,
            name:'register'
            },
            {
            path:'login',
            component:Login,
            name:'login'
            }
        ]
    },
    {
        path:'/register',
        component:Register
    },
    {
        path: '/error',
        component: Error
    },
    {
        path: '*',
        redirect: '/error'
    }
]


const router = new VueRouter({
    mode: 'history',
    routes
})

export default router